package com.woniu.springbootshiro.service;

import com.woniu.springbootshiro.mapper.LampStrategyMapper;
import com.woniu.springbootshiro.pojo.LampStrategy;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LampStrategyService {

  @Autowired
  private LampStrategyMapper lampStrategyMapper;

  public List<LampStrategy> queryAllLampStragegy() {
    return lampStrategyMapper.queryAllLampStragegy();
  }

  public int deleteOne(Integer id) {
    return lampStrategyMapper.deleteOne(id);
  }

  public int insertOne(LampStrategy lampStrategy){
    return lampStrategyMapper.insert(lampStrategy);
  }

  public LampStrategy queryStrategyById(Integer id){
    return lampStrategyMapper.selectByPrimaryKey(id);
  }

  public int updateStrategy(LampStrategy lampStrategy){
    return lampStrategyMapper.updateByPrimaryKeySelective(lampStrategy);
  }

}
